# Plotting for Parity
#plotga1 <- function(exppar){
    (palette(gray(seq(0,.8,len=6))))
    # Indexing
    idx2 <- seq(4,100,by=4)

    # Set graph parameters
    #par(mfrow=c(2,1))

    
    # Plot ObjF
    # Set data object
    obj <- pn06.objf
    postscript("par06.objf.ps", paper="special", width=7, height=5,horizontal=F)
    par(pin=c(5,3))
    # Average
    a0301 <- apply(obj$at.as,1,mean)
    a0401 <- apply(obj$co.as,1,mean)
    a0402 <- apply(obj$co.ws,1,mean)
    a0405 <- apply(obj$co.ai,1,mean)
    a0406 <- apply(obj$co.wi,1,mean)
    a0403 <- apply(obj$co.mo,1,mean)
    # Main trend
    plot(a0301[1:25],type="l",lty=6,col=6,lwd=2,ylim=c(0.4,0.65),xlim=c(0,25),
         xlab="Number of Interaction (*64)",ylab="Best Fitness")
    lines(a0401[idx2],type="l",lty=4,col=4)
    lines(a0402[idx2],type="l",lty=3,col=3)
    lines(a0405[idx2],type="l",lty=2,col=2)
    lines(a0406[idx2],type="l",lty=1,col=1)
    lines(a0403[idx2],type="l",lty=5,col=5)
    # Legend
    legend(1,0.47,ncol=2,
           c("GAAS","COAS","COWS","COAI","COWI","COMO"),
           lwd=c(2,1,1,1,1,1),
           lty=c(6,4,3,2,1,5),
           col=c(6,4,3,2,1,5),
           cex=0.8)
    title("Averaged Best Objective Fitness")
    dev.off()
    

    # Plot OFC
    # Set data object
    obj <- pn06.ofc
    postscript("par06.ofc.ps", paper="special", width=7, height=5,horizontal=F)
    par(pin=c(5,3))
    # Average
    a0301 <- apply(obj$at.as,1,mean)
    a0401 <- apply(obj$co.as,1,mean)
    a0402 <- apply(obj$co.ws,1,mean)
    a0405 <- apply(obj$co.ai,1,mean)
    a0406 <- apply(obj$co.wi,1,mean)
    a0403 <- apply(obj$co.mo,1,mean)
    # Main trend
    plot(a0401,type="l",lty=4,col=4,ylim=c(0,1),xlim=c(0,100),lwd=2,
         xlab="Generation",ylab="OFC")
    lines(a0402,type="l",lty=3,lwd=1,col=3)
    lines(a0405,type="l",lty=2,lwd=1.5,col=2)
    lines(a0406,type="l",lty=1,col=1)
    lines(a0403,type="l",lty=5,col=5)
    # Legend
    legend(1,0.8,ncol=2,
           c("COAS","COWS","COAI","","COWI","COMO"),
           lwd=c(2,1,1.5,0,1,1),
           lty=c(4,3,2,0,1,5),
           col=c(4,3,2,0,1,5),
           cex=0.8)
    title("Averaged Objective Fitness Correlation")
    
    # Closing device and clean up
    dev.off()
    rm(idx2, obj,
       a0301,a0401,a0402,a0405,a0406,a0403
    )
#}
